What is the difference between DATE, DATETIME, and TIMESTAMP?
What is the difference between DATE, DATETIME, and TIMESTAMP?
Ravi Vishwakarma is a dedicated Software Developer with a passion for crafting efficient and innovative solutions. With a keen eye for detail and years of experience, he excels in developing robust software systems that meet client needs. His expertise spans across multiple programming languages and technologies, making him a valuable asset in any software development project.
Anubhav Kumar
19-Aug-2025Note:
DATE→ Only the date.DATETIME→ Date + Time (no timezone conversion).TIMESTAMP→ Date + Time with timezone/UTC awareness (in MySQL), or row versioning (in SQL Server).DATE
YYYY-MM-DD.1000-01-01to9999-12-31.DATETIME
YYYY-MM-DD hh:mm:ss.1753-01-01 00:00:00to9999-12-31 23:59:59.TIMESTAMP (behavior differs by DBMS)
DATETIMEbut in UTC internally.DEFAULT CURRENT_TIMESTAMP.YYYY-MM-DD hh:mm:ss.1970-01-01 00:00:01 UTCto2038-01-19 03:14:07 UTC.Example (MySQL)